/*
 * @Author: zulezhe
 * @Date: 2022-03-25 16:37:44
 * @LastEditors: zulezhe
 * @LastEditTime: 2022-03-29 15:33:03
 * @Path: https://gitee.com/zulezhe/
 * @Description:
 */
/**
 * @Title: 类说明
 * @Description: (主进入方法)
 * @author FWY
 * @date: 2/28/2022, 1:55:56 PM
 * @version V1.0
 * All rights Reserved, Designed By www.hndist.com
 * 注意：本内容仅限于河南数慧信息技术有限公司内部传阅，禁止外泄以及用于其他的商业目
 */

//引入VUE
import { createApp } from "vue";
//引入mitt库,兄弟组件通信
import mitt from "mitt"
//引入element-plus
import ElementPlus,{ ElMessage, ElMessageBox , ElLoading } from "element-plus";
//引入element-plus样式
import "element-plus/theme-chalk/index.css";
//引入公共样式
import "@/assets/styles/includes.less";
//引入主文件
import App from "./App.vue";
//引入store
import store from "@/store/index";
//引入router
import router from "./router";
import "@/utils/permission";
// 统一导入el-icon图标
import * as ElIconModules from '@element-plus/icons-vue'
import Print from 'vue3-print-nb'
// 引入svg
import "./assets/icons/index.js"; // icon
import SvgIcon from "@/components/SvgIcon";

//创建公共应用对象
const app = createApp(App);
// 统一注册el-icon图标
for(let iconName in ElIconModules){
  app.component(`el-icon-${iconName.toLowerCase()}`,ElIconModules[iconName])
}
app.config.globalProperties.$mitt = new mitt()
app.config.globalProperties.$messageBox = ElMessageBox
app.config.globalProperties.$message = ElMessage
app.config.globalProperties.$loading = ElLoading 
app.config.globalProperties.$echarts = echarts // eslint-disable-line
app.use(store);
app.use(router);
app.use(Print);
app.use(ElementPlus).component("svg-icon", SvgIcon);
//挂载页面
app.mount("#app");
